package com.demo.service.impl;

import com.demo.common.model.BaseQuery;
import com.demo.vo.CustomerVo;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.demo.entity.Customer;
import com.demo.mapper.CustomerMapper;
import com.demo.service.CustomerService;
@Service
public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> implements CustomerService{

    @Autowired
    private CustomerMapper customerMapper;
    @Override
    public PageInfo<CustomerVo> queryCustomerListByPage(Integer current, Integer pageSize) {
        PageHelper.startPage(current,pageSize);
        List<CustomerVo> list = customerMapper.queryCustomerListPage(new BaseQuery());
        return new PageInfo<>(list);
    }
}
